const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  
  // 添加环境变量配置
  chainWebpack: config => {
    config.plugin('define').tap(args => {
      const env = process.env;
      args[0]['process.env'] = {
        ...args[0]['process.env'],
        VUE_APP_BASE_URL: JSON.stringify(env.VUE_APP_BASE_URL),
        VUE_APP_ENV_NAME: JSON.stringify(env.VUE_APP_ENV_NAME)
      }
      return args
    })
  }
})
